package domain.items;



/**
 * @author shai
 *
 */
public class MetaData {

	/**
	 * name of the file where this object will be saved 
	 */
	public static final String FILE_NAME = "MetaData.xml";
	
	/**
	 * each forum item gets a unique ID, this fields manages those id's
	 * actually it should be that - number of forum items = _idCounter.
	 */
	public long _idCounter = 0;


/*	/**
	 * we want the forum to have only one instance of MetaData
	 * so we use the Singelton design-pattern. this filed should keep the one instance of MetaData
	 */
//	private static MetaData _forumMetaData = null;


	/**
	 * private constructor.
	 * should be invoked only once - when the forum is created
	 * rest of the times, the MetaData instance should be read from a file
	 * and be set using 'setInstance(instance)'
	 */
	public MetaData() {
		this._idCounter = 0;
	}


/*	/**
	 * @return the single instance of the forum MetaData
	 * if this instance hasn't been created yet - then create it, and the return it
	 */
/*	public static MetaData getInstance() {
		if (_forumMetaData == null) {
			_forumMetaData = new MetaData();
		}
		return _forumMetaData;
	}

*/
/*	/**
	 * this method should be invoked RIGHT AFTER reading the MetaData from the file, and only once!
	 * it sets the singelton to be the instance that was read from the file.
	 * @param instance - an instance of MetaData that was created from a file.
	 * @return true if the instance was setted. false if not.
	 * 			if false is returned, it meens that there is already an instance of MetaData that was created or set.
	 */
/*	public static boolean setInstance(MetaData instance) {
		if (_forumMetaData == null) {
			_forumMetaData = instance;
			return true;
		}
		return false;
	}  */
}
